main{
    cdiContainer=new Weld().initialize();
    Node node=cdiContainer.instance().select(Node.class).get();
    node.wire();
 catch (  Exception e) {
    e.printStackTrace();
}
test{
  System.err.println(e);
}
dead{
  System.err.println(e);
}
wire{
  bus.register(this);
  bus.register(tray);
  Server server=new Server();
  SelectChannelConnector connector=new SelectChannelConnector();
  connector.setPort(4242);
  server.addConnector(connector);
  ServletHolder holderCometd=new ServletHolder(new CometdServlet());
  holderCometd.setInitOrder(1);
  holderCometdConfig.setInitOrder(2);
  ServletHolder holderUI=new ServletHolder(servletUI);
  ServletContextHandler context=new ServletContextHandler(ServletContextHandler.SESSIONS);
  context.setContextPath("/");
  context.addServlet(holderCometd,"/cometd/*");
  context.addServlet(holderCometdConfig,"/config");
  context.addServlet(holderUI,"/ui/*");
  HandlerList handlers=new HandlerList();
  handlers.setHandlers(new Handler[]{context,new DefaultHandler()});
  server.setHandler(handlers);
    server.start();
    server.join();
 catch (  Exception e) {
}
setContainer{
  Node.cdiContainer=cdiContainer;
}
instance{
  return cdiContainer.instance().select(c).get();
}
